<?phperror_reporting(E_ALL);ini_set('error_reporting', E_ALL);ini_set('display_errors', true);Class ErrorDocument{	var $code;	var $message;		function ErrorDocument($code, $message=null)	{// TODO: use message in error logging/mail		$this->code = $code;		$this->message = '';				switch ($code)		{			case 401:				$this->message = "Unauthorized.";				break;							case 403:				$this->message = "Forbidden.";				break;			case 404:				$this->message = "The document you requested could not be found.";				break;			case 408:				$this->message = "Request Timeout.";				break;							case 500:				$this->message = "Internal Server Error.";				break;						}				print($this->code.': '.$this->message);		if ($message)		{			print('<br />'.$message);		}	}}?>